{hasDocRight document=$menu module="website" rule="edit"}
<h1>{t}Edit menu{/t} "{$menuLabel|truncate:40:'...':true}"</h1>
<div id="moduleTabs">
     <ul>
         <li><a class="selected" href=""><span>{t}Properties{/t}</span></a></li>
     </ul>
</div>
<div id="formStatus">{$errors.status}</div>
<form name="form" method="post" action="?module=website&action=block_MenuEdit&docId={$menu->getUniqueId()}&docLang={$menu->getLang()}" id="ajaxForm">
	<div class="submitButton"><button type="reset" class="greyButton" >{t}Cancel{/t}</button> <button type="submit" name="form[submit]" class="greenButton" >{t}Save{/t}</button></div>
	<table class="listTable">		
		<tr>
            <td style="width:20px;">{t assignTo=iconTitle}Label - The menu label is only used in admin panel for identification.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formLabel">{t}Label{/t}</label></td>
            <td><input type="text" name="form[label]" id="formLabel" value="{$menu->getLabel()|escape:"html"}" style="width:300px" /> {if isset($errors.label)}{icon name="warning.png"} {$errors.label}{/if}</td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Publication - publication status defined if the menu is published on the website or not. Notice that all sub menus and sub pages won't be displayed too.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formPublicationStatus">{t}Publication status{/t}</label></td>
            <td>
                    <select name="form[publicationStatus]" id="formPublicationStatus">
                    <option value="DRAFT">{t}Not published{/t}</option>
                    <option value="PUBLISHED" {if $menu->getPublicationStatus() == 'PUBLISHED'}selected="selected"{/if}>{t}Published{/t}</option>
                </select>
            </td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Menus label - Menus label is the text displayed in the website menu(s){/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formMenuLabel">{t}Menus label{/t}</label></td>
            <td><input type="text" name="form[menuLabel]" id="formMenuLabel" value="{$menu->getMenuLabel()|escape:"html"}" style="width:300px" /> {if isset($errors.menuLabel)}{icon name="warning.png"} {$errors.menuLabel}{/if}</td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Overview label - Overview label is the text displayed on the website when we mouse over it.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formMenuHoverLabel">{t}Overview label{/t}</label></td>
            <td><input type="text" name="form[menuHoverLabel]" id="formMenuHoverLabel" value="{$menu->getMenuHoverLabel()|escape:"html"}" style="width:300px" /> {if isset($errors.menuHoverLabel)}{icon name="warning.png"} {$errors.menuHoverLabel}{/if}</td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Visibility - Defined if the menu is visible in other menus.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formVisibleInMenu">{t}Visible in menus{/t}</label></td>
            <td>
                <select name="form[visibleInMenu]" id="formVisibleInMenu">
                    <option value="1">{t}Yes{/t}</option>
                    <option value="0" {if $menu->isVisibleInMenu() == false}selected="selected"{/if}>{t}No{/t}</option>
                </select>
            </td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Visibility - Defined if the menu is visible in sitemap.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formVisibleInSiteMap">{t}Visible in sitemap{/t}</label></td>
            <td>
                <select name="form[visibleInSiteMap]" id="formVisibleInSiteMap">
                    <option value="1">{t}Yes{/t}</option>
                    <option value="0" {if $menu->isVisibleInSiteMap() == false}selected="selected"{/if}>{t}No{/t}</option>
                </select>
            </td>
        </tr>
		<tr>
            <td>{t assignTo=iconTitle}Visibility - Define if the menu is visible in the breadcrumb.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formVisibleInSiteMap">{t}Visible in breadcrumb{/t}</label></td>
            <td>
                <select name="form[visibleInBreadCrumb]" id="formVisibleInBreadCrumb">
                    <option value="1">{t}Yes{/t}</option>
                    <option value="0" {if $menu->isVisibleInBreadCrumb() == false}selected="selected"{/if}>{t}No{/t}</option>
                </select>
            </td>
        </tr>
		{if count($childs) > 0}
		<tr>
            <td>{t assignTo=iconTitle}Index page - Index page is the page which will be opened when clicking directly on the menu or sub menu button. The parameter are optional.{/t}{icon name="help.png" class="toolTip" title="$iconTitle"}</td>
            <td><label for="formIndexPage">{t}Index page{/t}</label></td>
            <td>
				<select name="form[indexPage]" id="formIndexPage">
						<option value="0">----</option>
					{foreach from=$childs item=page}						
						<option value="{$page->getUniqueId()}" {if $menu->getMenuPageId() == $page->getUniqueId()}selected="selected"{/if}>{$page->getLabel()|truncate:40:'...':true}</option>
					{/foreach}
				</select>
			</td>
        </tr>
		{/if}
        <tr><th colspan="3">{t}Information{/t}</th></tr>
		<tr><td colspan="2">{t}Id{/t}</td><td>{$menu->getUniqueId()}</td></tr>
		<tr><td colspan="2">{t}Language{/t}</td><td>{$menu->getLang()}</td></tr>
		<tr><td colspan="2">{t}Creation date{/t}</td><td>{date date=$menu->getCreationDate()}</td></tr>
		<tr><td colspan="2">{t}Last modification{/t}</td><td>{date date=$menu->getModificationDate()} {t}by{/t} {$menu->getAuthor()|fullname}</td></tr>
	</table>
</form>
{/hasDocRight}